
package com.iqiyi.pps.epg.core.model.channel;

import org.hibernate.annotations.Cache;
import org.hibernate.annotations.CacheConcurrencyStrategy;

import javax.persistence.*;
import java.sql.Timestamp;
import java.util.HashMap;
import java.util.Map;

/**
 * Created by xuzengqiang on 2014/12/1.
 */
@Entity
@Table(name = "channel_boss")
@Cache(usage = CacheConcurrencyStrategy.NONE)
public class ChannelBoss {

    private Long id;
    private Long fatherId;
    private Integer isMemeberFree;
    private Integer isMemberOnly;
    private String status;
    private Timestamp paidStartTime = new Timestamp(System.currentTimeMillis());
    private Timestamp paidEndTime = new Timestamp(System.currentTimeMillis());
    private Timestamp addTime = new Timestamp(System.currentTimeMillis());
    private Timestamp updateTime;

    public static final Map<Integer, String> MEMEBER_FREE_MAP = new HashMap<Integer, String>() {{
        put(0, "付费");
        put(1, "免费");

    }};

    public static final Map<Integer, String> MEMBER_ONLY_MAP = new HashMap<Integer, String>() {{
        put(0, "不是");
        put(1, "是");

    }};

    public static final Map<String, String> STATUS_MAP = new HashMap<String, String>() {{
        put("PAIED_AVAILABLE", "付费已划价");
        put("PAIED_NOT_AVAILABLE", "付费未划价");
        put("FREE", "免费");
    }};

    @Id
    @GeneratedValue(strategy = GenerationType.AUTO)
    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    @Column(name = "father_id")
    public Long getFatherId() {
        return fatherId;
    }

    public void setFatherId(Long fatherId) {
        this.fatherId = fatherId;
    }

    @Column(name = "is_memeber_free")
    public Integer getIsMemeberFree() {
        return isMemeberFree;
    }

    public void setIsMemeberFree(Integer isMemeberFree) {
        this.isMemeberFree = isMemeberFree;
    }

    @Column(name = "is_member_only")
    public Integer getIsMemberOnly() {
        return isMemberOnly;
    }

    public void setIsMemberOnly(Integer isMemberOnly) {
        this.isMemberOnly = isMemberOnly;
    }

    public String getStatus() {
        return status;
    }

    public void setStatus(String status) {
        this.status = status;
    }

    @Column(name = "paid_start_time")
    public Timestamp getPaidStartTime() {
        return paidStartTime;
    }

    public void setPaidStartTime(Timestamp paidStartTime) {
        this.paidStartTime = paidStartTime;
    }

    @Column(name = "paid_end_time")
    public Timestamp getPaidEndTime() {
        return paidEndTime;
    }

    public void setPaidEndTime(Timestamp paidEndTime) {
        this.paidEndTime = paidEndTime;
    }

    @Column(name = "add_time", updatable = false)
    public Timestamp getAddTime() {
        return addTime;
    }

    public void setAddTime(Timestamp addTime) {
        this.addTime = addTime;
    }

    @Column(name = "update_time", insertable = false, updatable = false)
    public Timestamp getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(Timestamp updateTime) {
        this.updateTime = updateTime;
    }
}
